CALM CLI access to CalmHub - cleanup of tests and tighten conditions when CalmHub accesses are made#1784
Merged
rocketstack-matt merged 5 commits intofinos:mainfrom Nov 8, 2025
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces protocol validation for the CalmHub document loader by adding a custom calm: protocol. The changes enable the system to differentiate between CalmHub documents and other document sources, improving the multi-strategy document loading behavior.
- Added
CALM_HUB_PROTOconstant to define thecalm:protocol - Implemented protocol validation in
CalmHubDocumentLoaderto only process documents with thecalm:protocol - Updated tests to use the new
calm:protocol format and removed deprecatedloadModeparameter
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| shared/src/document-loader/document-loader.ts | Adds CALM_HUB_PROTO constant to define the custom protocol identifier |
| shared/src/document-loader/document-loader.spec.ts | Removes deprecated loadMode parameter from test calls to buildDocumentLoader |
| shared/src/document-loader/calmhub-document-loader.ts | Implements protocol validation to ensure only calm: protocol documents are processed |
| shared/src/document-loader/calmhub-document-loader.spec.ts | Updates test URLs to use calm: protocol and adds test coverage for protocol validation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rocketstack-matt
approved these changes
Nov 7, 2025
pmerrison
pushed a commit
to pmerrison/architecture-as-code
that referenced
this pull request
Nov 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
calm:. Currently the path from any URL formatted document locator is valid, with the expectation that the path can be added to the CalmHub base URL.Assuming CalmHub base URL is
https://calmhub.finos.org/calm/:http://example.com/my-first-picture.png=> CalmHubDocumentLoader attempts to loadhttps://calmhub.finos.org/calm/my-first-picture.png.ftp:my-first-picture.png=> CalmHubDocumentLoader attempts to loadhttps://calmhub.finos.org/calm/my-first-picture.png.notcalm:my-first-picture.png=> CalmHubDocumentLoader attempts to loadhttps://calmhub.finos.org/calm/my-first-picture.png.http://example.com/my-first-picture.png=> CalmHubDocumentLoader does not attempt to load anything.ftp:my-first-picture.png=> CalmHubDocumentLoader does not attempt to load anything.notcalm:my-first-picture.png=> CalmHubDocumentLoader does not attempt to load anything.calm:my-first-picture.png=> CalmHubDocumentLoader attempts to loadhttps://calmhub.finos.org/calm/my-first-picture.png.Type of Change
Affected Components
cli/)shared/)calm-widgets/)calm-hub/)calm-hub-ui/)docs/)calm-plugins/vscode/)Commit Message Format ✅
Testing
Checklist